package com.qining618.cms.ucenter.controller.admin.request;

import com.qining618.cms.ucenter.enums.MenuTypeEnum;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 添加编辑菜单请求参数
 * @author flt
 * @date 2019-09-17
 */
@Data
public class AdminMenuEditRequest implements Serializable {

    private static final long serialVersionUID = -7199675723327445014L;

    /**
     * 上级id
     */
    @Min(value = 0, message = "上级菜单不存在")
    @NotNull(message = "上级菜单不能为空")
    private Long parentId;

    /**
     * 菜单编号
     */
    @NotBlank(message = "菜单编号不能为空")
    private String code;

    /**
     * 菜单名称
     */
    @NotBlank(message = "菜单名称不能为空")
    private String name;

    /**
     * 类型：1菜单 2按钮
     */
    @NotNull(message = "菜单类型不能为空")
    private MenuTypeEnum type;
}
